package phoenix.web.locators.base;

import org.openqa.selenium.By;

/**
 * Class provides base locators on My Account page
 */
public abstract class MyAccountLocatorsBase
{
	public By elementMySettingsDiv = By.xpath("//div[@class='left-block']/h2");
	public By blockMySettings = By.xpath("//*[contains(@class, 'b-page b-page-profile-settings')]");
	public By blockContactUs = By.xpath("//*[contains(@class, 'b-page-contact-us')]");
	// Buttons
	public By buttonEditPassword = By.xpath("//*[@class='b-settings-row b-settings-password']//*[contains(@class,'btn-light btn-edit-bare')]");
	public By buttonSavePassword = By.xpath("//*[@class='b-value']/div[6]/a");

	// Inputs
	public By inputOldPass = By.xpath("//*[@class='password-old' and @type='text']");
	public By inputNewPass = By.xpath("//*[@class='password-new' and @type='text']");
	public By checkboxShowPass = By.xpath("//*[@class='line show-pass']//*[contains(@type,'checkbox')]");

	// pop-up messages
	public By messagesOldPass = By.xpath("//div[4]/div[3]/div[2]/div[2]");
	public By messagesNewPass = By.xpath("//div[@class='b-error active']");
	public By blockUnSuccessMessage = By.xpath("//*[@class='b-value']//*[@class='b-error active']");
	public By blockSuccessMessage = By.xpath("//*[@class='b-value']//div[@class='b-success active']");
	public String blockUnSuccessMessageJS = ".b-error.active";
	public String blockSuccessMessageJS = ".b-success.active";
	public By elementSuccessMessage = By.xpath("//div[@class='b-success active']"); // Email field
	public By blockSuccessPasswordMessage = By.xpath("//div[@data-password-update-result='1']"); // Password field

	// Buttons
	public By buttonSaveEmail = By.xpath("(.//*[@id='layoutContent']//*[@class='btn-light'])[2]");
	public By buttonEditEmail = By.xpath("//a[@title='Click to edit']");
	public By btnBillingHistory = By.linkText("Billing History");
	public By btnRemoveAccount = By.linkText("Remove Account");
	public By btnRemindPassword = By.xpath("//a[@id='remind-password']");

	// Input locators
	public By inputPassword = By.cssSelector("input.password");
	public By inputEmail = By.cssSelector("input.email");

	// Pop-up messages
	public By messagePassword = By.xpath("//div[@data-emailupdate-password-error='1']");
	public By messageEmail = By.xpath("//div[@data-emailupdate-email-error='1']");
	public By messageConfirm = By.cssSelector("div.b-success.active");

	// Upgrade button
	public By btnUpgradeMembersip = By.xpath("//*[@class='b-value']/a[@class='btn']");
	public By btnUpgradePackage = By.xpath("//*[@class='b-value']//a[contains(@href,'/pay/membership')]");
	public By btnUpgradeFeatures = By.xpath("//*[@class='b-value']//a[contains(@href,'/pay/features')]");

	public By btnClose = By.id("close-popup");

	public By btnDeactSubscr = By.linkText("Deactivate subscription");
	public By btnCancelRepeatBilling = By.linkText("Cancel repeat billing");
	public By inputPassForRemove = By.id("password");
	public By btnContinueStep1 = By.id("check-password");
	public By btnFinallyRemove = By.xpath("(//input[@name='name'])[4]");
	public By btnContinueStep2 = By.id("status-membership");
	public By btnRemoveStep3 = By.xpath("//*[@id='user-reason-answer']/li[3]/label/input");
	public By btnContinueStep3 = By.id("user-reason");
	public By btnRemoveStep4 = By.xpath("//*[@id='are-you-sure-answer']/li[1]/label/input");
	public By btnContinueStep4 = By.id("are-you-sure");
	public By btnCall = By.xpath("//*[@class='cancel-billing-items']/div/div/a[@class='btn-update']");
	public By btnRemoveStep5 = By.id("confirm");
	public By txtLogin = By.id("LoginForm_email");
	public By btnRemoveStep6 = By.id("confirm");
	public By btnShowProfile = By.xpath("(//input[@name='name'])[2]");
	public By statusHide = By.xpath("//*[@id='status-membership-user-answer']/li[2]/label/input[@value='hide']");
	public By statusShow = By.xpath("//*[@id='status-membership-user-answer']/li[2]/label/input[@value='show']");
	public By banHidden = By.xpath("//*[@class='b-profile-status']/div/div[@class='b-text']");
	public By btnMembership = By.xpath("//a[@class='btn']");
	public By pageLoad = By.xpath("//*[@class='l-frame loading']");

	// Block New activity notifications
	public By checkboxNewMessages;
	public By checkboxNewWink;
	public By checkoutNewViews;
	// Block Matches' activity notifications:
	public By checkboxOnSmsChat = By.xpath("//input[@data-name='newsFeed::onSmsChat']");
	public By checkboxOnSmsChatFeed = By.xpath("//input[@data-name='newsFeed::onSmsChatFeed']");
	public By checkboxAreActiveInMessenger; // FGF related
	public By checkboxYouMayLike = By.xpath("//input[@data-name='newsFeed::onYouMayLike']");
	public By checkboxAddedANewPhoto = By.xpath("//input[@data-name='newsFeed::onUserPhotoAdded']");
	public By checkboxUpgradedProfile = By.xpath("//input[@data-name='newsFeed::onUserUpgrade']");
	public By checkboxAddedDescriptionDetails = By.xpath("//input[@data-name='newsFeed::onUserDescriptionAdded']");
	public By checkboxAddedPersonalDetails = By.xpath("//input[@data-name='newsFeed::onUserInfoUpdated']");
	public By checkboxRecentlyJoinedTheSite = By.xpath("//input[@data-name='newsFeed::onUserFirstLogin']");
	public By checkboxOnlineNow = By.xpath("//input[@data-name='newsFeed::onLoginComplete']");

	public By blockChangePassword = By.xpath("(//*[contains(@class,'b-settings-row b-settings-password')]//*[contains(@class,'b-value')])[2]");
	public By inputOldPasswordForm = By.xpath("(//*[@class='b-settings-row b-settings-password active']//*[@class='b-value']//input)[1]");
	public By inputNewPasswordForm = By.xpath("(//*[@class='b-settings-row b-settings-password active']//*[@class='b-value']//input)[3]");
	public By blockChangeEmail = By.xpath("(//*[contains(@class,'b-settings-row b-settings-email')]//*[contains(@class,'b-value')])[2]");
	public By inputEmailPasswordForm = By.xpath("((//*[contains(@class,'b-settings-row b-settings-email')]//*[contains(@class,'b-value')])[2]//input)[1]");
	public By inputNewEmailForm = By.xpath("((//*[contains(@class,'b-settings-row b-settings-email')]//*[contains(@class,'b-value')])[2]//input)[2]");
	public By blockPopupSecureAccess = By.cssSelector(".b-popup.b-remove-profile.cancel-billing");
	public By linkRemindPassword = By.id("remind-password");
	public By blockRemindPasswordMessage = By.id("password-error");
	public By blockUID = By.xpath("//*[@class='b-settings-row'][2]//span[@class='value']");

	public By selectStep2(int p_select)
	{
		return By.xpath("(//input[@name='name'])[" + p_select + "]");
	}

	public By selectStep3(int p_select)
	{
		return By.xpath("(//ul[@id='user-reason-answer'])/li[" + p_select + "]/label/input");
	}

}
